<!-- 封装通用的列表组件 -->
<script setup>
const props = defineProps({
  title: {
    type: String,
    default: "",
  },
});
</script>

<template>
  <el-card class="box-card">
    <template #header>
      <div class="card-header">
        <div>
          <span>{{ props.title }}</span>
        </div>
        <div class="card-header">
            <slot name="header-options"></slot>
        </div>
      </div>
    </template>
    <!-- 主要内容 -->
    <slot name="main"></slot>
    <!-- 尾部的布局 -->
    <div class="auto-space-between" style="margin-top: 10px">
      <div>
        <slot name="footer-left"></slot>
      </div>
      <div>
        <slot name="footer-right"></slot>
      </div>
    </div>
  </el-card>
</template>

<style scoped>
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.text {
  font-size: 14px;
}
.item {
  margin-bottom: 18px;
}
</style>